function recordEvent(eventData) {
    var params = eval('(' + eventData + ')');
    var data = "";
    $.each(params,function(key,value){
        data += key+"="+value+"&";
    });
    $.ajax({
        type: "get",
        url: "?_c=recordLog&_a=eventRecord",
        data: data,
        dataType: "json",
        success: function (retData) {
            if (retData.ret == true) {
                console.log("event log record success");
            } else {
                console.log("event log record fail");
            }
        }
    });
}

function getChatLogToday(room_id){
    var data = "";
    data = "room_id="+room_id;
    var result;
    var tmp = "";
    $.ajax({
        type: "get",
        url: "?_c=recordLog&_a=getChatLog",
        data: data,
        dataType: "json",
        success: function (retData) {
            if (retData.ret == true) {
                tmp = retData.data;
                $.each(tmp,function(key,value){
                    $("#dialog").append('<div class="speech_item"><div class="msg_left"><img src="/public/img/user_image/'+ value.image_id + '.png" class="user_icon" /> ' + value.user_name + ' <br> ' + value.time + '</div><div class="msg_right"><p class="triangle-isosceles top">' + value.msg + '</p></div></div>');
                });
                scroolDialog();
            }
        }
    });
}